//
//  SAFeedbackConsoultChildViewController.m
//  SunOn
//
//  Created by mc on 2017/5/4.
//  Copyright © 2017年 NeoZhang. All rights reserved.
//  我的咨询子页面

#import "SAFeedbackConsoultChildViewController.h"
#import "SAFeedbackConsoultCell.h"
#import "SAFeedBackConsoultDetaileController.h"
@interface SAFeedbackConsoultChildViewController ()<UITableViewDelegate,UITableViewDataSource>
@property (nonatomic, strong) UITableView *tabview;
@end

@implementation SAFeedbackConsoultChildViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self.view addSubview:self.tabview];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
#pragma mark - UITableViewDelegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    UIStoryboard *story = [UIStoryboard storyboardWithName:@"Feedback" bundle:nil];
    SAFeedBackConsoultDetaileController *vc = [story instantiateViewControllerWithIdentifier:@"SAFeedBackConsoultDetaileController"];
    vc.title = @"咨询详情";
    [self.navigationController pushViewController:vc animated:YES];
}
#pragma mark - UITableViewDataSource

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
    return 10;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 10;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    SAFeedbackConsoultCell *cell = [tableView dequeueReusableCellWithIdentifier:@"SAFeedbackConsoultCell" forIndexPath:indexPath];
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return 100;
}
#pragma mark - setter&getter
- (UITableView *)tabview {
    if (!_tabview) {
        self.tabview = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, SASCREEN_WIDTH, SASCREEN_HEIGHT - 104) style:(UITableViewStylePlain)];
        self.tabview.delegate = self;
        self.tabview.dataSource = self;
        [self.tabview registerNib:[UINib nibWithNibName:@"SAFeedbackConsoultCell" bundle:nil] forCellReuseIdentifier:@"SAFeedbackConsoultCell"];
        self.tabview.showsVerticalScrollIndicator = NO;
        self.tabview.showsHorizontalScrollIndicator = NO;
        self.tabview.separatorStyle = UITableViewCellSeparatorStyleNone;
    }
    return _tabview;
}

@end
